<div class="info">
<h1 class="font_h1">Setting</h1>
<?php if(isset($error))  : ?>
<h2 class="error_red"><?php echo $error;?></h2>
<?php endif;?>
<form action="<?php echo base_url().'admin/setting'?>" method="POST" enctype="multipart/form-data" id="frm_add">
<table class="table1">
    <tr>
                <td width="20%">Site Name (Tiếng Việt)</td>
                <td width="80%">
               <?php if($setting->title_tv !='') { ?>
                <input type="text" name="txt_title_tv" style="width:400px" value="<?php echo $setting->title_tv?>"  />
                <?php } else {?>
                <input type="text" name="txt_title_tv" style="width:400px" value="<?php echo set_value('txt_title_tv')?>"  />    
                <? }?>   
                </td>
    </tr>  
     <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_title_tv');?></span>
                </td>
    </tr>  
     <tr>
                <td width="20%">Site Name (Tiếng Anh)</td>
                <td width="80%">
                <?php if($setting->title_ta !='') { ?>
                <input type="text" name="txt_title_ta" style="width:400px" value="<?php echo $setting->title_ta?>"  />
                <?php } else {?>
                <input type="text" name="txt_title_ta" style="width:400px" value="<?php echo set_value('txt_title_ta')?>"  />    
                <? }?>         
                </td>
    </tr>   
    <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_title_ta');?></span>
                </td>
    </tr>  
    <tr>
                <td width="20%">Địa chỉ công ty (Tiếng việt)</td>
                <td width="80%">
                <?php if($setting->address_tv !='') { ?>
                <input type="text" name="txt_address_tv" style="width:400px" value="<?php echo $setting->address_tv?>"  />
                <?php } else {?>
                <input type="text" name="txt_address_tv" style="width:400px" value="<?php echo set_value('txt_address_tv')?>"  />    
                <? }?>  
                </td>
    </tr>  
     <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_address_tv');?></span>
                </td>
    </tr> 
    <tr>
                <td width="20%">Địa chỉ công ty (Tiếng Anh)</td>
                <td width="80%">
                <?php if($setting->address_ta !='') { ?>
                <input type="text" name="txt_address_ta" style="width:400px" value="<?php echo $setting->address_ta?>"  />
                <?php } else {?>
                <input type="text" name="txt_address_ta" style="width:400px" value="<?php echo set_value('txt_address_ta')?>"  />    
                <? }?> 
                </td>
    </tr> 
    <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_address_ta');?></span>
                </td>
    </tr>
    <tr>
                <td width="20%">Địa chỉ Email công ty</td>
                <td width="80%">
                 <?php if($setting->email_company !='') { ?>
                <input type="text" name="txt_email_company" style="width:400px" value="<?php echo $setting->email_company?>"  />
                <?php } else {?>
                <input type="text" name="txt_email_company" style="width:400px" value="<?php echo set_value('txt_email_company')?>"  />    
                <? }?> 
                </td>
    </tr> 
     <tr>
                <td width="20%"></td>
                <td width="80%">
                	<span style="background: red;width:200px"><?php echo form_error('txt_email_company');?></span>
                </td>
    </tr>
     <tr>
                <td width="20%">Phone</td>
                <td width="80%">
                 <?php if($setting->phone !='') { ?>
                <input type="text" name="txt_phone" style="width:400px" value="<?php echo $setting->phone?>"  />
                <?php } else {?>
                <input type="text" name="txt_phone" style="width:400px" value="<?php echo set_value('txt_phone')?>"  />    
                <? }?> 
                
                   
                </td>
    </tr> 
    <tr>
                <td width="20%">Fax</td>
                <td width="80%">
                 <?php if($setting->fax !='') { ?>
                <input type="text" name="txt_fax" style="width:400px" value="<?php echo $setting->fax;?>"  />
                <?php } else {?>
                <input type="text" name="txt_fax" style="width:400px" value="<?php echo set_value('txt_fax')?>"  />    
                <? }?> 
                
                   
                </td>
    </tr> 
    <tr>
                <td width="20%">Website</td>
                <td width="80%">
                <?php if($setting->website !='') { ?>
                <input type="text" name="txt_website" style="width:400px" value="<?php echo $setting->website;?>"  />
                <?php } else {?>
                <input type="text" name="txt_website" style="width:400px" value="<?php echo set_value('txt_website')?>"  />    
                <? }?> 
                </td>
    </tr> 
    <tr>
                <td width="20%">Hotline</td>
                <td width="80%">
                 <?php if($setting->hotline !='') { ?>
                <input type="text" name="txt_hotline" style="width:400px" value="<?php echo $setting->hotline;?>"  />
                <?php } else {?>
                <input type="text" name="txt_hotline" style="width:400px" value="<?php echo set_value('txt_hotline')?>"  />    
                <? }?>
               
                   
                </td>
    </tr> 
    <tr>
                <td width="20%">Địa chỉ nhận mail</td>
                <td width="80%">
                <?php if($setting->email_receive !='') { ?>
                <input type="text" name="txt_email_receive" style="width:400px" value="<?php echo $setting->email_receive;?>"  />
                <?php } else {?>
                <input type="text" name="txt_email_receive" style="width:400px" value="<?php echo set_value('txt_email_receive')?>"  />    
                <? }?>
                </td>
    </tr> 
    <tr>
                <td width="20%">Google Analytics</td>
                <td width="80%">
                <?php if($setting->google_code !='') { ?>
                <input type="text" name="txt_google_code" style="width:400px" value="<?php echo $setting->google_code;?>"  />
                <?php } else {?>
                <input type="text" name="txt_google_code" style="width:400px" value="<?php echo set_value('txt_google_code')?>"  />    
                <? }?>
                </td>
    </tr> 
    <tr>
                <td width="20%">Bật captcha khi gởi email</td>
                <td width="80%">
                <select name="txt_capcha" style="width:80px">
                	<option value="1"<?php if(@$setting->capcha == '1') echo "selected";?>>Có</option>
                    <option value="0"<?php if(@$setting->capcha == '0') echo "selected";?>>Không</option>
                </select>
                   
                </td>
    </tr>
     <tr>
                <td width="20%">Logo</td>
                <td width="80%">
               <img src="<?php echo base_url().@$setting->logo;?>" /> <br />               
                <input type="hidden" name="image" value="<?php echo @$setting->logo;?>" />   
               <input type="file" name="txt_logo" />
                </td>
    </tr>
    <tr>
                <td width="20%">Logo Alt</td>
                <td width="80%">
                <?php if($setting->logo_alt !='') { ?>
                <input type="text" name="txt_logo_alt" style="width:400px" value="<?php echo $setting->logo_alt;?>"  />
                <?php } else {?>
                <input type="text" name="txt_logo_alt" style="width:400px" value="<?php echo set_value('txt_logo_alt')?>"  />    
                <? }?>
                
                   
                </td>
    </tr>
    <tr>
                <td width="20%">Ngôn ngữ mặc định của website</td>
                <td width="80%">
                 <select name="txt_language" style="width:80px">
                	<option value="vn" <?php if(@$setting->language == 'vn') echo "selected";?>>Việt Nam</option>
                    <option value="en"  <?php if(@$setting->language == 'en') echo "selected";?>>English</option>
                </select>
                   
                </td>
    </tr>
     <tr>
                <td width="20%">Kiểu gởi mail</td>
                <td width="80%">
                 <select name="txt_style_email" style="width:80px">
                	<option value="1"  <?php if(@$setting->style_email == '1') echo "selected";?>>SMTP</option>
                    <option value="2"  <?php if(@$setting->style_email == '2') echo "selected";?>>Email</option>
                </select>
                </td>
    </tr>
    <tr>
                <td width="20%">Smtp Host</td>
                <td width="80%">
                <?php if($setting->smtp_host !='') { ?>
                <input type="text" name="txt_smtp_host" style="width:400px" value="<?php echo $setting->smtp_host;?>"  />
                <?php } else {?>
                <input type="text" name="txt_smtp_host" style="width:400px" value="<?php echo set_value('txt_smtp_host')?>"  />    
                <? }?>
                
                </td>
    </tr>
    <tr>
                <td width="20%">Smtp Username</td>
                <td width="80%">
                <?php if($setting->smtp_user !='') { ?>
                <input type="text" name="txt_smtp_user" style="width:400px" value="<?php echo $setting->smtp_user;?>"  />
                <?php } else {?>
                <input type="text" name="txt_smtp_user" style="width:400px" value="<?php echo set_value('txt_smtp_user')?>"  />    
                <? }?>
                
                   
                </td>
    </tr>
     <tr>
                <td width="20%">Smtp Password</td>
                <td width="80%">
                <?php if($setting->smtp_pass !='') { ?>
                <input type="text" name="txt_smtp_pass" style="width:400px" value="<?php echo $setting->smtp_pass;?>"  />
                <?php } else {?>
                <input type="text" name="txt_smtp_pass" style="width:400px" value="<?php echo set_value('txt_smtp_pass')?>"  />    
                <? }?>
                </td>
    </tr>
    <tr>
                <td width="20%">Smtp Port</td>
                <td width="80%">
                <?php if($setting->smtp_port !='') { ?>
                <input type="text" name="txt_smtp_port" style="width:400px" value="<?php echo $setting->smtp_port;?>"  />
                <?php } else {?>
                <input type="text" name="txt_smtp_port" style="width:400px" value="<?php echo set_value('txt_smtp_port')?>"  />    
                <? }?>
                
                </td>
    </tr>
    
    <tr>
                <td width="20%"></td>
                <td width="80%">
                <input type="hidden" name="txt_id" value="6" />
                <a  class="button" onclick="$('#frm_add').submit()" href="javascript:void(0)">Lưu lại</a>
                </td>
    </tr>
</table>
</form>
</div>